package com.tedu.aop.demo;

import org.springframework.stereotype.Component;

@Component
public class CalculatorImpl implements Calculator{

    @Override
    public int add(int a, int b) {

        int result=a+b;
        System.out.println("add方法调用完毕");
        return result;
    }

    @Override
    public double add(double a, double b) {

        double result=a+b;
        System.out.println("add方法调用完毕");
        return result;
    }

    @Override
    public int sub(int a, int b) {

        int result=a-b;
        System.out.println("sub方法调用完毕");
        return result;
    }

    @Override
    public int mul(int a, int b) {

        int result=a*b;
        System.out.println("mul方法调用完毕");
        return result;
    }

    @Override
    public int div(int a, int b) {

        int result=a/b;
        System.out.println("div方法调用完毕");
        return result;
    }
}
